import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/ui/app_ui.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';
import 'package:app/src/utils/image_path_utils.dart';

///此客户是新客户
class UiNewCustomer {
  ///ContractCopyInfo 合同审核信息
  static Widget build(BuildContext context, ContractCopyInfo? data) {
    bool isVisible = data?.isNewCustomer() ?? false; //判断是否为新客户。
    if (!isVisible) {
      return AppUi.getEmptyView();
    }
    var label = Image.asset(
      ImagePathUtils.getPathWithImageLabel("ic_011_mark.png"),
      width: 22,
    );
    var text = Text(
      "  " + AppStrings.of(context).NewCustomer,
      style: AppStyle.textStyleWithTitleBold(),
    );
    var row = Row(
      children: [label, text],
    );
    var card = UiCard.build(context, row);
    return card;
  }
}
